import App from './App'
import Vue from 'vue'
import {
	get,
	post,
	noAuthget,
	noAuthpost,
} from './api/index.js';
import uploadFile from 'utils/uploadFile.js'
import time from 'utils/time.js'


// 使用 import
// import wx from 'weixin-js-sdk';

Vue.prototype.$get = get;
Vue.prototype.$post = post;
Vue.prototype.$noAuthget = noAuthget;
Vue.prototype.$noAuthpost = noAuthpost;
Vue.prototype.$uploadFile = uploadFile;
Vue.prototype.$time = time;
//导航高度
Vue.prototype.$navHeight = ''
uni.getSystemInfo({
	success: res => {
		Vue.prototype.$navHeight = res.statusBarHeight * (750 / res.windowWidth) + 15;
	},
});

// //导航高度
// app.config.globalProperties.$navHeight = (() => {
// 	let navHeight = ''
// 	uni.getSystemInfo({
// 		success: res => {
// 			navHeight = res.statusBarHeight * (750 / res.windowWidth) + 15;
// 		},
// 	});
// 	return navHeight
// })()

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	...App
})
app.$mount()